'''
文件操作
'''
# stus = []
# with open('file/test.txt','rw') as ws:
#     ws.write('')
# with open('file/test.txt', 'a') as ws:
#     ws.write()
# f = open('file/test.txt', 'r')
# print(f.read())
# f.seek(0)
# print('line:',f.readline())
# 练习：读指定文本文件中的内容，一行一行的读
f = open('file/test.txt', 'r')
for s in f.readlines():
    print(s)
f.close()

f = open('file/test.txt', 'a')
# f.write('abd')
# f.writelines('132')
f.close()
with open('file/test.txt', 'a') as ws:
    ws.write('dasdad')
    ws.write(')dasdad')
    ws.close()

